package ch03_singleton.clonesingleton;

/**
 * 
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
public class CloneSingleton implements Cloneable {
    private static final CloneSingleton obj = new CloneSingleton();

    private CloneSingleton() {
    }

    public static CloneSingleton getInstance() {
        return obj;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        // return super.clone();
        return getInstance();
    }
}
